<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<style>
 
</style> 
             <div id="sou" style="margin:0;">
 					<input type="text" style="display:none;" id="pagecount" />
				   <table   border="1"   id="mytable">
					<tr>
				      <td>资源id</td>
				      <td>资源名称</td>
				      <td>资源地址</td>
				      <td>资源大小</td>
				   </tr>
				   
				   <c:forEach var="item" items="${videoResource_list}" >
				    <tr>
				      <td class="id">${item.id}</td>
				      <td class="rd" >${item.name}</td>
				      <td>${item.url}</td>
				      <td>${item.size}</td>
				   </tr>
				    </c:forEach>
					</table>
				    	 
					 </div>
<script language="javascript" type="text/javascript"> 
$(function(){
    //用jQuery获取table中td值
    $("#mytable tr").click(function(){
        /* alert("table td值："+$(this).text()); */
        var ale=$(this).find(".id").text();
        var ales=$(this).find(".rd").text();
        $("td").attr(ale);
        $("td").attr(ales);
        parent.$("#resourceId").val(ale);
        parent.$("#resourceName").val(ales);
      //先得到当前iframe层的索引
        var index = parent.layer.getFrameIndex(window.name);
        //再执行关闭
        parent.layer.close(index);
        
    });
    
    //jQuery获取table中点击位置所在行的id
    $("#mytable td").click(function() {
        //td的id 
        $(this).attr("id");
        //tr的id  
        $(this).parent().attr("id");
    });
});
</script>